home *** CD-ROM | disk | FTP | other *** search
- unit uSMSDetail;
-
- {
- *******************************************************************************
- * Descriptions: SMS Detail view implementation
- * $Source: /cvsroot/fma/fma/uSMSDetail.pas,v $
- * $Locker: $
- *
- * Todo:
- * - More information to show
- *
- * Change Log:
- * $Log: uSMSDetail.pas,v $
- * Revision 1.8 2004/06/14 09:33:05 z_stoichev
- * Fixed label unicode support.
- *
- * Revision 1.7 2004/05/19 18:34:16 z_stoichev
- * Build 0.1.0.35c
- *
- * Revision 1.6 2003/11/28 09:38:07 z_stoichev
- * Merged with branch-release-1-1 (Fma 0.10.28c)
- *
- * Revision 1.5.2.5 2003/11/13 16:37:10 z_stoichev
- * Changed images.
- *
- * Revision 1.5.2.4 2003/11/06 16:08:49 z_stoichev
- * Close work now.
- *
- * Revision 1.5.2.3 2003/11/04 11:41:20 z_stoichev
- * Made Close button work with ESC hit.
- *
- * Revision 1.5.2.2 2003/10/31 14:38:51 z_stoichev
- * Added Close button, instead of OK, Cancel.
- *
- * Revision 1.5.2.1 2003/10/27 07:22:54 z_stoichev
- * Build 0.1.0 RC1 Initial Checkin.
- *
- * Revision 1.5 2003/10/23 12:28:36 z_stoichev
- * Fixed Win XP theme tabsheet issue.
- * Added more information fields.
- * Font changed.
- *
- * Revision 1.4 2003/10/17 09:14:10 z_stoichev
- * Changed GUI.
- *
- * Revision 1.3 2003/01/30 04:15:57 warren00
- * Updated with header comments
- *
- *
- *******************************************************************************
- }
-
- interface
-
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ExtCtrls, StdCtrls, ComCtrls, TntStdCtrls;
-
- type
- TfrmDetail = class(TForm)
- PageControl1: TPageControl;
- TabSheet1: TTabSheet;
- Label2: TLabel;
- edFrom: TEdit;
- Label1: TLabel;
- edSMSC: TEdit;
- Label3: TLabel;
- edTimeStamp: TEdit;
- Button1: TButton;
- Label4: TLabel;
- memoText: TTntMemo;
- Label6: TLabel;
- edUDHI: TEdit;
- ebRef: TEdit;
- Label7: TLabel;
- memoPDU: TMemo;
- Label5: TLabel;
- Bevel1: TBevel;
- Image1: TImage;
- Bevel2: TBevel;
- lblName: TTntLabel;
- procedure Button1Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure FormShow(Sender: TObject);
- private
- FPDU: String;
- procedure SetPDU(const Value: String);
- { Private declarations }
- public
- { Public declarations }
- property PDU: String read FPDU write SetPDU;
- end;
-
- var
- frmDetail: TfrmDetail;
-
- implementation
-
- uses gsm_sms, Unit1;
-
- {$R *.dfm}
-
- { TfrmDetail }
-
- procedure TfrmDetail.SetPDU(const Value: String);
- var
- sms: Tsms;
- begin
- FPDU := Value;
-
- sms := Tsms.Create;
- try
- sms.PDU := FPDU;
-
- edFrom.Text := sms.Number;
-
- memoText.Text := sms.Text;
- edUDHI.Text := sms.UDHI;
- if edUDHI.Text = '' then edUDHI.Text := '(No Information)';
- ebRef.Text := sms.MessageReference;
-
- edSMSC.Text := sms.SMSC;
- if edSMSC.Text = '' then edSMSC.Text := '(No Information)';
-
- if sms.TimeStamp > 0 then
- edTimeStamp.Text := DateTimeToStr(sms.TimeStamp)
- else
- edTimeStamp.Text := '(No Information)';
-
- memoPDU.Clear;
-
- if sms.IsOutgoing then begin
- Label2.Caption := 'To Address:';
- memoPDU.Lines.Add('Message Type: SMS SUBMIT');
- end
- else begin
- Label2.Caption := 'From Address:';
- memoPDU.Lines.Add('Message Type: SMS DELIVER');
- end;
-
- memoPDU.Lines.Add('');
- memoPDU.Lines.Add(FPDU);
-
- lblName.Caption := Form1.LookupContact(sms.Number);
- finally
- sms.Destroy;
- end;
- end;
-
- procedure TfrmDetail.Button1Click(Sender: TObject);
- begin
- Close;
- end;
-
- procedure TfrmDetail.FormCreate(Sender: TObject);
- begin
- {$IFNDEF VER150}
- Form1.ThemeManager1.CollectForms(Self);
- {$ENDIF}
- end;
-
- procedure TfrmDetail.FormShow(Sender: TObject);
- begin
- PageControl1.ActivePageIndex := 0;
- Button1.SetFocus;
- end;
-
- end.
-